package com.hdj.chapter18;

/**
 * @author hdj
 * @description </br>
 * @date 2017/12/14.
 */
public class CommandTest {
    public static void main(String[] args) {
        /**
         * 初始化一个士兵
         */
        Soldier soldier = new Soldier();
        /**
         * 初始化一个司令部
         */
        Headquarters headquarters = new Headquarters(soldier);
        /**
         * 初始化一个司令
          */
        Commander commander = new Commander(headquarters);

        //司令下命令
        commander.action();
    }
}
